package com.abc.cloud.service;

import com.abc.cloud.dto.role.RolePage;
import com.abc.cloud.dto.user.UserAndAllRole;
import com.abc.cloud.entity.MenuEntity;
import com.abc.cloud.entity.PermsEntity;
import com.abc.cloud.vo.role.RoleSave;
import com.abc.cloud.vo.role.RoleUpdate;
import com.baomidou.mybatisplus.extension.service.IService;
import com.abc.cloud.common.utils.PageUtil;
import com.abc.cloud.entity.RoleEntity;

import java.util.List;
import java.util.Map;

/**
 * 角色表
 *
 * @author LiJunXi
 * @email 2770063826@qq.com
 * @date 2023-10-27 13:09:54
 */
public interface RoleService extends IService<RoleEntity> {

    PageUtil queryPage(Map<String, Object> params);

    Boolean updateRolePerms(List<Long> menuIds, Long roleId);

    List<PermsEntity> getRolePermsList(Long roleId);

    Boolean updateRoleMenu(List<Long> adminMenuIds, Long roleId);

    List<MenuEntity> getRoleMenuList(Long roleId);

    RolePage getRolePage(Integer currentPag, Integer pageSize, String content);

    Boolean deleteRoleInfo(Long roleId);

    RoleEntity updateRoleInfo(RoleUpdate roleUpdate);

    RoleEntity saveRoleInfo(RoleSave roleSave);

    RoleEntity getRoleInfo(Long roleId);

    List<RoleEntity> getRoleList();

    void updateStatusByIds(List<Long> asList, Integer status);

    UserAndAllRole getUserRoleAndAll(String username);
}

